package com.chart.web.controller.chart;
import com.chart.chart.domian.ChartSettings;
import com.chart.chart.domian.ChartStatistics;
import com.chart.chart.service.IChartAxisConfigurationService;
import com.chart.chart.service.IChartLabelsService;
import com.chart.chart.service.IChartSettingsService;
import com.chart.chart.service.IChartStatisticsService;
import com.chart.common.core.controller.BaseController;
import com.chart.common.core.domain.AjaxResult;
import com.chart.web.controller.chart.dto.ChartSettingsDTO;
import com.chart.web.controller.chart.dto.PageVisitRequestDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.util.*;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/settings/chart")
public class ChartSettingsController extends BaseController {

    @Autowired
    private IChartSettingsService chartSettingsService;
    private IChartAxisConfigurationService chartAxisConfigurationService;

    @Autowired
    private IChartLabelsService chartLabelsService;

    @Autowired
    private IChartStatisticsService chartStatisticsService;

    @GetMapping("/data")
    public AjaxResult getChartData() {
        List<ChartSettings> list = chartSettingsService.getAllChartSettings();
        return AjaxResult.success(list);
    }






}



